package com.jiyun.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiyun.om.entity.Waybill;
import com.jiyun.mapper.WaybillMapper;
import com.jiyun.service.IWaybillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 运单表 服务实现类
 * </p>
 *
 * @author zhx
 * @since 2025-02-12
 */
@Service
public class WaybillServiceImpl extends ServiceImpl<WaybillMapper, Waybill> implements IWaybillService {
@Autowired
WaybillMapper waybillMapper;

    @Override
    public Waybill getOriginalWaybillById(Integer id) {
        return waybillMapper.selectById(id);
    }

    @Override
    public Page<Waybill> getAll(Integer pageNum, Integer pageSize, Waybill waybill) {
        Page<Waybill> page = new Page<>(pageNum, pageSize);
        return waybillMapper.getAll(page,waybill);
    }

    @Override
    public List<Waybill> findAll() {
        return waybillMapper.findAll();
    }


}
